// 回显所有命令行参数和所有环境字符串
#include "apue.h"
extern char **environ;

int main(int argc, char *argv[]) {
    for (int i = 0; i < argc; ++i) {
        printf("argv[%d]: %s\n", i, argv[i]);
    }
    char **p_string = environ;
    while (*p_string) {
        printf("%s\n", *p_string++);
    }
    return 0;
}